
// component/nav.js
Component({
  properties: {
    current: String
  },

  data: {
    navList: [
      { name: '宣教资料', url: '/pages/index/index', icon: '/static/images/nav_1.png', iconHover: '/static/images/nav_1_on.png' },
      { name: '智能便携泵', url: '/pages/detail/detail', icon: '/static/images/nav_2.png', iconHover: '/static/images/nav_2_on.png' },
    ],
  },

  methods: {
    toLink(e) {
      if ('/' + getCurrentPages()[getCurrentPages().length - 1].route === e.currentTarget.dataset.url) {return}
      wx.reLaunch({
        url: e.currentTarget.dataset.url
      })
    }
  }
})

